<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>字符过滤器</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/common/css/style.css}">
    <link rel="stylesheet" th:href="@{/common/css/cm_style.css}">
    <link rel="icon" th:href="@{/common/image/code.png}">

    <script type="text/javascript" th:src="@{/layui/layui.js}"></script>
    <script type="text/javascript" th:src="@{/common/js/config.js}"></script>

    <style>
        .html-tag {
            margin-left: 10px;
            float: left;
        }

        .html-tag > b {
            margin-left: 5px;
            cursor: pointer;
        }

        input.html-tag {
            width: 80px;
            height: 30px;
            font-size: 10px;
            padding-right: 22px;
        }

        .html-add-btn {
            font-size: 20px;
            line-height: 30px;
            left: -19px;
            position: relative;
            cursor: pointer;
        }

        .mapping-tag {
            float: left;
        }

        input.mapping-tag {
            width: 80px;
            height: 30px;
            font-size: 10px;
            float: left;
        }

        span.mapping-tag {
            line-height: 30px;
            width: 30px;
            margin-left: 10px;
        }

        .block-model {
            display: none;
        }

    </style>
</head>

<body>

<div class="layui-fluid">
    <div class="layui-row" style="margin-top: 10px;">
        <form id="sForm" class="layui-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <div class="layui-input-inline" style="width: 150px;">
                        <input type="text" name="name" placeholder="请输入名称" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-inline">
                    <div class="layui-input-inline" style="width: 150px;">
                        <select name="characterType">
                            <option value="">请选择类型</option>
                            <option value="html_strip">HTML过滤器</option>
                            <option value="mapping">mappings过滤器</option>
                            <option value="pattern_replace">正则过滤器</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline" style="width: 100px;">
                        <button class="layui-btn btn-search" type="button">搜索</button>
                    </div>
                </div>

                <div class="layui-inline" style="float: right;">
                    <div class="layui-input-inline" style="width: 100px;">
                        <button id="a_c_a_btn" class="layui-btn layui-btn-md" type="button">新增</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <table class="layui-hide" id="a_c_table" lay-filter="a_c_table"></table>

    <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
</div>


<div id="a_c_a_from" class="cm-layer">
    <form  id="aForm" class="layui-form" lay-filter="a_c_form">
        <input type="hidden" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label">名称</label>
            <div class="layui-input-block">
                <input type="text" name="name"  lay-verify="required" lay-filter="a-form" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-block">
                <select name="characterType" lay-filter="typeName" lay-verify="required">
                    <option value="">请选择类型</option>
                    <option value="html_strip">HTML过滤器</option>
                    <option value="mapping">mappings过滤器</option>
                    <option value="pattern_replace">正则过滤器</option>
                </select>
            </div>
        </div>
        <div id="htmlBlock" class="layui-form-item block-model">
            <label class="layui-form-label">保留标签</label>
            <div class="layui-input-block">
                <input type="text"  autocomplete="off" placeholder="HTML标签" class="layui-input html-tag">
                <b class="html-add-btn">+</b>
            </div>
        </div>

        <div id="mappingBlock" class="layui-form-item block-model">
            <label class="layui-form-label">替换字符</label>
            <div class="layui-input-block">
                <div class="row" style="height: 37px;">
                    <button type="button" class="layui-btn layui-btn-sm">+</button>
                </div>
            </div>
        </div>


        <div id="regBlock" class="layui-form-item block-model">
            <label class="layui-form-label">正则表达</label>
            <div class="layui-input-block">
                <input type="text"  autocomplete="off" placeholder="正则表达式" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-sm" lay-submit lay-filter="a-form">立即提交</button>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript" th:src="@{/model_res/cm.character.js}"></script>
</body>
</html>